<!DOCTYPE html>
<html>
<head>
  <title>Parcel Sandbox</title>
  <meta charset="UTF-8" />
  <style>
    #container {
      width: 1000px;
      height: 500px;
    }
  </style>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@logicflow/core/dist/style/index.css" />
  <!--LogicFlow extension包css-->
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@logicflow/extension/lib/style/index.css" />
  <!--LogicFlow core包js-->
  <script src="https://cdn.jsdelivr.net/npm/@logicflow/core/dist/logic-flow.js"></script>
  <!--LogicFlow的插件支持单个引入，这里以菜单插件为例-->
  <script src="https://cdn.jsdelivr.net/npm/@logicflow/extension/lib/Menu.js"></script>

  <style>
    #container {
      width: 1000px;
      height: 500px
    }
  </style>
</head>

<body>
<div id="container"></div>

<script>
  const lf = new LogicFlow({
    container: document.querySelector("#container")
  });

  lf.render({
    nodes: [
      {
        id: "node_id_1",
        type: "circle",
        x: 100,
        y: 100,
        text: {
          x: 100,
          y: 100,
          value: "节点1"
        },
        properties: {}
      },
      {
        id: "node_id_2",
        type: "circle",
        x: 200,
        y: 300,
        text: {
          x: 200,
          y: 300,
          value: "节点2"
        },
        properties: {}
      }
    ],
    edges: [
      {
        id: "edge_id",
        type: "polyline",
        sourceNodeId: "node_id_1",
        targetNodeId: "node_id_2",
        properties: {
          isPass: true
        }
      }
    ]
  });
</script>
</body>
</html>
